3.2.82 \(\int \frac {\sin (c+d x)}{a+a \sin (c+d x)} \, dx\) [182]

Optimal. Leaf size=28 \[ \frac {x}{a}+\frac {\cos (c+d x)}{d (a+a \sin (c+d x))} \]

[Out]

x/a+cos(d*x+c)/d/(a+a*sin(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2814, 2727} \begin {gather*} \frac {\cos (c+d x)}{d (a \sin (c+d x)+a)}+\frac {x}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sin[c + d*x]/(a + a*Sin[c + d*x]),x]

[Out]

x/a + Cos[c + d*x]/(d*(a + a*Sin[c + d*x]))

Rule 2727

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x]
/; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2814

Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*(x/d)
, x] - Dist[(b*c - a*d)/d, Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d
, 0]

Rubi steps

\begin {align*} \int \frac {\sin (c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {x}{a}-\int \frac {1}{a+a \sin (c+d x)} \, dx\\ &=\frac {x}{a}+\frac {\cos (c+d x)}{d (a+a \sin (c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(72\) vs. \(2(28)=56\).
time = 0.08, size = 72, normalized size = 2.57 \begin {gather*} \frac {\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left ((c+d x) \cos \left (\frac {1}{2} (c+d x)\right )+(-2+c+d x) \sin \left (\frac {1}{2} (c+d x)\right )\right )}{a d (1+\sin (c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sin[c + d*x]/(a + a*Sin[c + d*x]),x]

[Out]

((Cos[(c + d*x)/2] + Sin[(c + d*x)/2])*((c + d*x)*Cos[(c + d*x)/2] + (-2 + c + d*x)*Sin[(c + d*x)/2]))/(a*d*(1
 + Sin[c + d*x]))

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 37, normalized size = 1.32

method result size
risch \(\frac {x}{a}+\frac {2}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}\) \(29\)
derivativedivides \(\frac {\frac {4}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) \(37\)
default \(\frac {\frac {4}{2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2}+2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}\) \(37\)
norman \(\frac {\frac {x}{a}+\frac {x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a}+\frac {x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {x \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {2}{a d}+\frac {2 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}\) \(109\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(d*x+c)/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

4/d/a*(1/2/(tan(1/2*d*x+1/2*c)+1)+1/2*arctan(tan(1/2*d*x+1/2*c)))

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 50, normalized size = 1.79 \begin {gather*} \frac {2 \, {\left (\frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a} + \frac {1}{a + \frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}}\right )}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="maxima")

[Out]

2*(arctan(sin(d*x + c)/(cos(d*x + c) + 1))/a + 1/(a + a*sin(d*x + c)/(cos(d*x + c) + 1)))/d

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 54, normalized size = 1.93 \begin {gather*} \frac {d x + {\left (d x + 1\right )} \cos \left (d x + c\right ) + {\left (d x - 1\right )} \sin \left (d x + c\right ) + 1}{a d \cos \left (d x + c\right ) + a d \sin \left (d x + c\right ) + a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="fricas")

[Out]

(d*x + (d*x + 1)*cos(d*x + c) + (d*x - 1)*sin(d*x + c) + 1)/(a*d*cos(d*x + c) + a*d*sin(d*x + c) + a*d)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 80 vs. \(2 (20) = 40\).
time = 0.62, size = 80, normalized size = 2.86 \begin {gather*} \begin {cases} \frac {d x \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{a d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a d} + \frac {d x}{a d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a d} + \frac {2}{a d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a d} & \text {for}\: d \neq 0 \\\frac {x \sin {\left (c \right )}}{a \sin {\left (c \right )} + a} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)/(a+a*sin(d*x+c)),x)

[Out]

Piecewise((d*x*tan(c/2 + d*x/2)/(a*d*tan(c/2 + d*x/2) + a*d) + d*x/(a*d*tan(c/2 + d*x/2) + a*d) + 2/(a*d*tan(c
/2 + d*x/2) + a*d), Ne(d, 0)), (x*sin(c)/(a*sin(c) + a), True))

________________________________________________________________________________________

Giac [A]
time = 3.43, size = 32, normalized size = 1.14 \begin {gather*} \frac {\frac {d x + c}{a} + \frac {2}{a {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="giac")

[Out]

((d*x + c)/a + 2/(a*(tan(1/2*d*x + 1/2*c) + 1)))/d

________________________________________________________________________________________

Mupad [B]
time = 0.74, size = 27, normalized size = 0.96 \begin {gather*} \frac {x}{a}+\frac {2}{a\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(c + d*x)/(a + a*sin(c + d*x)),x)

[Out]

x/a + 2/(a*d*(tan(c/2 + (d*x)/2) + 1))

________________________________________________________________________________________